﻿
#include "pch.h"
#include"printChess.h"
#include"putChess.h"
#include"judgeWin.h"
//#include"Ban.h"
int a[15][15];

int main()
{
	printChess p;
	putChess putqizi;
	judgeWin judge;
	//Ban b;
	p.print();
	int m_row = 0;
	int n_col = 0;
	int cnt = 3;	
	int win=0;//,lose
	while (!(win = judge.isWin())) {
		if (cnt % 2)
			cout << "请黑方输入位置：";
		else
			cout << "请白方输入位置: ";
		cin >> m_row >> n_col;
		if (putqizi.put(m_row, n_col, cnt % 2 + 1)) {
			system("cls");
			p.print();

		}

		else {
			 
			cout << "错误，请选择正确的位置填入!" << endl;
			system("cls");
			p.print();
			--cnt;

		}
		++cnt;
		
	}

	if (win == 2) {
		//if (b.overline(m_row, n_col))
			//cout << "长连禁手，白胜" << endl;
		 cout << "黑方胜利" << endl;
	}
	else
		cout << "白方胜利" << endl;
	return 0;
}